package com.letian.record.service.impl;

import java.util.List;
import com.letian.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.letian.record.mapper.RecordPlaceMapper;
import com.letian.record.domain.RecordPlace;
import com.letian.record.service.IRecordPlaceService;

/**
 * 记录地址Service业务层处理
 * 
 * @author bmz
 * @date 2023-10-15
 */
@Service
public class RecordPlaceServiceImpl implements IRecordPlaceService 
{
    @Autowired
    private RecordPlaceMapper recordPlaceMapper;

    /**
     * 查询记录地址
     * 
     * @param placeId 记录地址主键
     * @return 记录地址
     */
    @Override
    public RecordPlace selectRecordPlaceByPlaceId(Long placeId)
    {
        return recordPlaceMapper.selectRecordPlaceByPlaceId(placeId);
    }

    /**
     * 查询记录地址列表
     * 
     * @param recordPlace 记录地址
     * @return 记录地址
     */
    @Override
    public List<RecordPlace> selectRecordPlaceList(RecordPlace recordPlace)
    {
        return recordPlaceMapper.selectRecordPlaceList(recordPlace);
    }

    /**
     * 新增记录地址
     * 
     * @param recordPlace 记录地址
     * @return 结果
     */
    @Override
    public int insertRecordPlace(RecordPlace recordPlace)
    {
        recordPlace.setCreateTime(DateUtils.getNowDate());
        return recordPlaceMapper.insertRecordPlace(recordPlace);
    }

    /**
     * 修改记录地址
     * 
     * @param recordPlace 记录地址
     * @return 结果
     */
    @Override
    public int updateRecordPlace(RecordPlace recordPlace)
    {
        recordPlace.setUpdateTime(DateUtils.getNowDate());
        return recordPlaceMapper.updateRecordPlace(recordPlace);
    }

    /**
     * 批量删除记录地址
     * 
     * @param placeIds 需要删除的记录地址主键
     * @return 结果
     */
    @Override
    public int deleteRecordPlaceByPlaceIds(Long[] placeIds)
    {
        return recordPlaceMapper.deleteRecordPlaceByPlaceIds(placeIds);
    }

    /**
     * 删除记录地址信息
     * 
     * @param placeId 记录地址主键
     * @return 结果
     */
    @Override
    public int deleteRecordPlaceByPlaceId(Long placeId)
    {
        return recordPlaceMapper.deleteRecordPlaceByPlaceId(placeId);
    }
}
